package com.bolingcavalry.crm.contacts.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.entity.customer.CustomerContacts;
import com.vo.AfterSales.AfterSalesVO;
import com.vo.CustomerContactVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ContactsMapper extends BaseMapper<CustomerContacts> {
    IPage<CustomerContactVO> list(Page<CustomerContacts> page, String customerCompanyName, String fullName, String phoneNumber);

    List<CustomerContactVO> listByCustomerId(Long customerId);

    int setPrimary(Long id);

    void setAllPrimary();

    List<CustomerContactVO> listByCustomerCompanyId(Long id);

    List<AfterSalesVO> listByCustomerCompanyIdAfterSales(Long id);

}
